Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Caps


GXSetShapeCap

You can use the GXSetShapeCap function to change the cap information of the style object associated with a particular shape.

void GXSetShapeCap(gxShape target, const gxCapRecord *cap);
target
A reference to the shape whose cap information you want to change.
cap
A pointer to the new cap information.
DESCRIPTION
The GXSetShapeCap function replaces the cap information in the style object of the shape specified by the target parameter with the cap information specified in the cap parameter. You use the gxCapRecord structure to provide cap information.

Passing nil for the cap parameter indicates that you want no caps and QuickDraw GX removes any cap information from the target shape.

If the target shape shares its style object with other shapes, this function makes a copy of the style object, sets the target shape to reference the copy, and changes the cap property of the copy. (However, if the effect of this function would leave the cap information unchanged, this function does not create a copy of the style object; instead, it posts a notice.)

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
style_is_nil 
parameter_out_of_range(debugging version)
empty_shape_not_allowed(debugging version)
ignorePlatformShape_not_allowed(debugging version)
illegal_type_for_shape(debugging version)
nil_style_in_glyph_not_allowed(debugging version)
complex_glyph_style_not_allowed(debugging version)
shapeFill_not_allowed(debugging version)
Notices (debugging version) 
caps_already_set 
tags_in_shape_ignored 
SEE ALSO
For a discussion of start and end caps, see "Caps" on page 3-23.

For examples of adding caps to shapes, see "Adding Caps to a Shape" on page 3-57 and "Adding Standard Caps to a Shape" on page 3-59.

For a discussion of the gxCapRecord structure and a description of what types of shapes you can use as cap shapes, see "The Cap Structure" on page 3-99.

To retrieve cap information from a style object, use the GXGetStyleCap function, which is described on page 3-124.

To specify cap information for a style object, use the GXSetStyleCap function, which is described on page 3-125.

To retrieve cap information from a style object associated with a particular shape, use the GXGetShapeCap function, which is described on page 3-126.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help